package com.itheima.io.bufferedinputstream.demo02;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class FileInputStreamDemo01 {

    public static void main(String[] args) throws IOException {

        // 创建一个FileInputStream对象
        FileInputStream fileInputStream = new FileInputStream("itheima-io-bufferedinputstream\\b.txt") ;

        // 一次读取一个字节
        int by = fileInputStream.read();        // 返回值代表的就是读取到的字节
        System.out.println((char)by);

        by = fileInputStream.read();        // 返回值代表的就是读取到的字节
        System.out.println((char)by);

        // 释放资源
        fileInputStream.close();

    }

}
